package com.xjrsoft.module.workflow.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xjrsoft.common.page.PageOutput;
import com.xjrsoft.module.workflow.dto.GetPageListNwfTaskDto;
import com.xjrsoft.module.workflow.vo.TaskVo;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface IXjrNwfTaskService {
    Object upcomingTasks(String userId, GetPageListNwfTaskDto dto);

    Integer getupcomingTaskCount(String userId);

    Object getHistoryTask(String userId, GetPageListNwfTaskDto dto) throws Exception;

    Object myTask(String userId, GetPageListNwfTaskDto dto) throws Exception;

    Object manualTask(String userId, GetPageListNwfTaskDto dto);

    JSONArray historyTaskList(String processInstanceId, boolean isPersonalTask) throws Exception;

     JSONArray getAllmanualinfo(String actId,String deploymentId,String processInstanceId) throws Exception;

    PageOutput getRelationTask(GetPageListNwfTaskDto dto, String userId);

    JSONObject getRelationTaskInfo(String processInstanceId);

    boolean saveOrEditTempfiledInfo(JSONObject parameter) throws Exception;

    Object getTempfiledInfoList(GetPageListNwfTaskDto dto);

    boolean deleteTempfiledInfo(String fId);

    Map<String,String> getTaskInfo(String taskId,String operation) throws Exception;

    boolean changeCandidate(String taskId,String newUser,String oldUserId) throws Exception;

    boolean againCandidate(JSONArray jsonArray) throws Exception;

    boolean read(String taskId);

    JSONObject  getStartTaskForm(JSONObject  keyMap, String formId,String resourceId,String nwfSchemeInfoId,String processInstanceId,String deployId);

   boolean isCallActivity(String actId, String processDefinitionId, String processInstanceId, Integer type);

    Integer getHistoryTaskCount(String userId);

    Integer myTaskCount(String userId);

    Integer manualTaskCount(String userId);

    boolean recallProcess(String taskId,String processInstanceId) throws Exception;

    JSONArray getProcessTask(String taskId, String userId) throws Exception;

    JSONObject createprocessForm(String id, String nwfRelationId) throws Exception;

        List<JSONObject> getAllProcessId(String deploymentId) throws Exception;

      JSONObject changeProcessVersion(String deploymentId, String processInstanceId) throws Exception;

     List<TaskVo> queryByParam(String serialNumber, String queryParameter, List<TaskVo> list,JSONArray searchFields);

    List<String> getUserIdByTask(String taskId);

    String deleteUselessDate();
}
